package com.happy.config.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: lifeng
 * @Date: 2018/12/7 13:50
 * @Description:
 */
@RestController
@RefreshScope   //动态刷新需要    http://localhost:8889/actuator/bus-refresh执行刷新
public class ConfigClientController {

  @Value("${hello}")
  private String name;

  @GetMapping("hello")
  public String hello(){
    return "返回的信息："+name;
  }

}
